{% extends "navgation.html" %}
{% block content %}
{% autoescape off %}
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <div class="panel panel-primary">
                    <div class="panel-heading">
                        文章
                    </div>
                    <div class="panel-body">
                        <table class="table table-hover table-border">
                            
                            <tbody>
                            {% for article in objs %}
                                <tr><td>{{article.id}}</td><td><h4 class="media-heading"><a href="/blogs/article/detail/{{article.id}}/">{{article.post_title}}</a></h4></td><td>{{article.post_author}}</td><td>{{article.post_date}}</td></tr>
                            {% endfor %}
                            
                            </tbody>
                        </table>
                        <ul class="pagination">
                            {% if prevous_page != 0 %}
                                <li><a href="/blogs/articles/list/{{prevous_page}}">&laquo;上一页</a></li>
                            {% else%}
                                <li><a class="disabled" href="/blogs/articles/list/{{prevous_page}}">&laquo;上一页</a></li>
                            {% endif %}
                            {% for page_num in page_range %}
                                {% if current_page == page_num %}
                                <li  class="active">
                                    <a href="/blogs/articles/list/{{page_num}}">{{page_num}}</a>
                                </li>
                                {% else %}
                                <li>
                                    <a href="/blogs/articles/list/{{page_num}}">{{page_num}}</a>
                                </li>
                                {% endif %}
                            {% endfor %}
                            {% if next_page != 0 %}
                                <li><a href="/blogs/articles/list/{{next_page}}">下一页&raquo;</a></li>
                            {% else%}
                                <li><a class="disabled" href="/blogs/articles/list/{{next_page}}">下一页&raquo;</a></li>
                            {% endif %}
                        </ul>
                    </div>
                    <div class="panel-footer">
                        
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endautoescape %}
{% endblock %}
